<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="./vue.js"></script>
	</head>
	<body>
		<div id="app">
			<button type="button" v-on:click='say'>say{{msg}}</button>
			<!-- @click 后面的方法不要加（） -->
			<button type="button" @click="warn('yuan',$event)">warn</button>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:"#app",
				data:{
					msg:"han",
				},
				methods:{
					say(event){
						alert(this.msg)
						alert(event.target.innerHTML)
					},
					warn(name,event){
						alert(name+','+event.target.innerHTML)
					}
					
					
				}
			})
		</script>
	</body>
</html>
